package com.forezp.function;

import com.alibaba.fastjson.JSON;
import com.forezp.vo.Order;
import com.mzt.logapi.service.IParseFunction;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import org.springframework.util.StringUtils;

import javax.annotation.Resource;

/**
 * @author muzhantong
 * create on 2021/2/9 5:20 下午
 */
@Slf4j
@Component
public class OrderBeforeParseFunction implements IParseFunction {



    @Override
    public boolean executeBefore() {
        return false;
    }

    @Override
    public String functionName() {
        return "ORDER_TEST";
    }

    @Override
    public String apply(Object value) {
        log.info("@@@@@@@@");
        if (StringUtils.isEmpty(value)) {
            return "";
        }
        if (value.equals("肯德基")) {
            return "------------肯德基------------";
        }

        return "--------测试函数------------";
    }
}
